package com.wpw.dream.dubbo.rest;

import javax.ws.rs.NotFoundException;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;

public class RestCustomExceptionMapper implements ExceptionMapper<NotFoundException> {

	@Override
	public Response toResponse(NotFoundException exception) {
		System.out.println("404");
		return Response.status(Response.Status.NOT_FOUND).entity("Oops! the requested resource is not found!")
				.type("text/plain").build();
	}

}
